package hu.test.atacama;

import android.os.Parcel;
import android.os.Parcelable;

public class Sensor implements Parcelable {
	
	private String name;

	private String value;
	
	private String unitOfMeasure;
	
	public String getSensorName() {
		return name;
	}

	public void setSensorName(String name) {
		this.name = name;
	}
	
	public String getSensorValue() {
		return value;
	}

	public void setSensorValue(String value) {
		this.value = value;
	}
	
	public String getUnitOfMeasure() {
		return unitOfMeasure;
	}

	public void setUnitOfMeasure(String unitOfMeasure) {
		this.unitOfMeasure = unitOfMeasure;
	}
	
	public Sensor(String name, String value, String unitOfMeasure) {
		this.name = name;
		this.value = value;
		this.unitOfMeasure = unitOfMeasure;
	}
	
	protected Sensor(Parcel in) {
		name = in.readString();
		value = in.readString();
		unitOfMeasure = in.readString();
	}
	
	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(name);
		dest.writeString(value);
		dest.writeString(unitOfMeasure);
	}

	public static final Parcelable.Creator<Sensor> CREATOR = new Parcelable.Creator<Sensor>() {
		public Sensor createFromParcel(Parcel in) {
			return new Sensor(in);
		}

		public Sensor[] newArray(int size) {
			return new Sensor[size];
		}
	};

}
